package pattern;

import org.junit.Test;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class demo1 {

    @Test
    public void demo1(){
        Pattern pattern = Pattern.compile("西城区");
        Matcher matcher = pattern.matcher("北京市北京西城区");
        if (matcher.find()){
            System.out.println("result:true");
        }else {
            System.out.println("result:false");
        }
    }
}
